package com.yixun.qfbao.xf.model.dto;

import com.alibaba.fastjson.annotation.JSONField;
import com.yixun.qfbao.xf.model.enums.SalesStatusOrderEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.math.BigDecimal;
import java.util.Date;

@ApiModel
public class PremisesViewDto {
	/**
	 * 楼盘ID
	 */
	@ApiModelProperty("楼盘ID")
	private Long id;
	/**
	 * 楼盘名称
	 */
	@ApiModelProperty("楼盘名称")
	private String premisesName;
	/**
	 * 封面图
	 */
	@ApiModelProperty("封面图")
	private String url;
	/**
	 * 城市
	 */
	@ApiModelProperty("城市名称")
	private String cityName;
	/**
	 * 楼盘地址
	 */
	@ApiModelProperty("楼盘地址")
	private String premisesAddress;

	/**
	 * 开盘日期
	 */
	@ApiModelProperty("开盘日期")
	private String openingTime;

	/**
	 * 销售均价
	 */
	@ApiModelProperty("销售均价")
	private BigDecimal averagePrice;
	/**
	 * 佣金
	 */
	@ApiModelProperty("佣金")
	private String commission;
	/**
	 * 佣金单位
	 */
	@ApiModelProperty("佣金单位")
	private String unit;
	/**
	 * 楼盘标签
	 */
	@ApiModelProperty("楼盘标签")
	private String codeName;
	/**
	 * 楼盘业态
	 */
	@ApiModelProperty("楼盘业态")
	private String estateType;
	/**
	 * 营销号
	 */
	@ApiModelProperty("营销号")
	private String marketingNumber;
	/**
	 * 关闭次数
	 */
	@ApiModelProperty("关闭次数,当大于0时,为关闭楼盘")
	private Integer closeCount;
	/**
	 * 项目经理
	 */
	@ApiModelProperty("项目经理")
	private String manager;
	/**
	 * 联系方式
	 */
	@ApiModelProperty("联系方式")
	private String mobile;
	/**
	 * 销售状态
	 */
	@JSONField(serialize = false)
	@ApiModelProperty("销售状态code")
	private String saleStatus;

	@ApiModelProperty("销售状态")
	private String saleStatusCN;

	@JSONField(deserialize = false)
	@ApiModelProperty("更新时间")
	private Date updateTime;

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public String getSaleStatusCN() {
		return saleStatusCN;
	}

	public void setSaleStatusCN(String saleStatusCN) {
		this.saleStatusCN = saleStatusCN;
	}

	public String getSaleStatus() {
		return saleStatus;
	}

	public void setSaleStatus(String saleStatus) {
		this.saleStatus = saleStatus;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getUnit() {
		return unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}

	public Integer getCloseCount() {
		return closeCount;
	}

	public void setCloseCount(Integer closeCount) {
		this.closeCount = closeCount;
	}

	public String getPremisesName() {
		return premisesName;
	}

	public void setPremisesName(String premisesName) {
		this.premisesName = premisesName;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getCityName() {
		return cityName;
	}

	public void setCityName(String cityName) {
		this.cityName = cityName;
	}

	public String getPremisesAddress() {
		return premisesAddress;
	}

	public void setPremisesAddress(String premisesAddress) {
		this.premisesAddress = premisesAddress;
	}

	public BigDecimal getAveragePrice() {
		return averagePrice;
	}

	public void setAveragePrice(BigDecimal averagePrice) {
		this.averagePrice = averagePrice;
	}

	public String getCommission() {
		return commission;
	}

	public void setCommission(String commission) {
		this.commission = commission;
	}

	public String getCodeName() {
		return codeName;
	}

	public void setCodeName(String codeName) {
		this.codeName = codeName;
	}

	public String getEstateType() {
		return estateType;
	}

	public void setEstateType(String estateType) {
		this.estateType = estateType;
	}

	public String getOpeningTime() {
		return openingTime;
	}

	public void setOpeningTime(String openingTime) {
		this.openingTime = openingTime;
	}

	public String getMarketingNumber() {
		return marketingNumber;
	}

	public void setMarketingNumber(String marketingNumber) {
		this.marketingNumber = marketingNumber;
	}

	public String getManager() {
		return manager;
	}

	public void setManager(String manager) {
		this.manager = manager;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	
	public Long getSalesOrder() {
		return SalesStatusOrderEnum.getValueByCode(this.getSaleStatus());
	}

}
